varying vec3 normal, lightVec, viewerVec;
varying vec4 shadowTexCoord, diffuse, ambient;
varying vec4 texCoord;
varying mat4 modelViewMat;

void main()
{	
	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

	normal = gl_NormalMatrix * gl_Normal;
	
	lightVec = vec3(gl_LightSource[0].position);
	
	viewerVec = -vec3(gl_ModelViewMatrix * gl_Vertex);
	
	shadowTexCoord =  gl_TextureMatrix[0] * gl_ModelViewMatrix * gl_Vertex;
	gl_TexCoord[0] = gl_MultiTexCoord0;
	
	texCoord = gl_Vertex;
	modelViewMat = gl_ModelViewMatrix;
		
	diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
	ambient = gl_FrontMaterial.ambient * gl_LightSource[0].ambient;
	//ambient += gl_LightModel.ambient * gl_FrontMaterial.ambient;	
} 